import java.util.Scanner;

public class StringAdd {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入字符串：");
        String str = input.nextLine();
        if (str.length() < 2) {
            System.out.println("字符串长度不足以比较！");
            return;
        }
        char first = str.charAt(0);
        char last = str.charAt(str.length() - 1);
        String result = String.valueOf(first) + last;
        System.out.println("新字符串结果：" + result);
    }
}

